<template>
  <div>
    <h1>hello</h1>
    <div>
      <button @click="askurl">跨域请求</button>
      <button @click="askbaidu">百度请求</button>
      <button @click="askpro">实验项目请求</button>
    </div>
  </div>
</template>


<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'Hello',
  methods: {
    //跨域请求
    askurl(){
      this.axios.get('/api/nacos/config/get').then(res=>{
        alert(res.data);
      })
    },//askurl

    //请求百度
    askbaidu(){
      this.axios.get('/baidu').then(res=>{
        console.log(res.data);
      })
    },//askbaidu

    //请求项目
    askpro(){
      this.axios.get('/report/project/getProByCId/1').then(res=>{
        console.log(res.data);
      })
    }//askpro
  }
}
</script>



<style scoped>

</style>
